// -----------------------------
// Author: 		Dhaenens Gert 
// Creation: 	1/3/2015 12:18:27 PM				
// -----------------------------

#ifndef _SongGenerator_h
#define _SongGenerator_h

#include "Common.h"

struct SongDesc
{
	struct Melody
	{
		Float			Amplitude;
		SoundWaveType	Type;
		UInt32			MinimumNoteLength;
		UInt32			MaximumNoteLength;
		UInt32			MinimumNotes;
		UInt32			MaximumNotes;
		Float			BaseFrequency;
		Int32			MinimumNoteOffset;
		Int32			MaximumNoteOffset;
		UInt32			MinimumOverlap;
		UInt32			MaximumOverlap;
	} Melody;
};

class Application;
class Sound;

struct SoundSample;

class SongGenerator
{
public:

	static Sound*			Generate(Application* lpApp, const SongDesc& desc);

private:

	static SoundSample		GenerateMelody(Application* lpApp, const SongDesc& desc);

	SongGenerator();
	~SongGenerator();
	SongGenerator(const SongGenerator& refSongGenerator);
	SongGenerator& operator=(const SongGenerator& refSongGenerator);
};

#endif